﻿using Ordering.Domain.Seedwork;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Ordering.Domain.AggregatesModel.OrderAggregate
{
    /// <summary>
    /// 快递地址
    /// </summary>
    public class ExpressAddress
        : Entity, IAggregateRoot
    {
        /// <summary>
        /// 小区ID
        /// </summary>
        public int ResidentialAreasId { get; private set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 经度
        /// </summary>
        [Column(TypeName = "decimal(18,8)")]
        public decimal? Longitude { get; private set; }
        /// <summary>
        /// 纬度
        /// </summary>
        [Column(TypeName = "decimal(18,8)")]
        public decimal? Latitude { get; private set; }
        /// <summary>
        /// 负责人Id(预留)
        /// </summary>
        public int? ResponsibleManId { get; set; }

        public ExpressAddress(int residentialAreasId,string address,
            decimal? longitude = null,decimal? latitude = null, int? responsibleManId = null)
        {
            this.ResidentialAreasId = residentialAreasId;
            this.Address = address;
            this.Longitude = longitude;
            this.Latitude = latitude;
            this.ResponsibleManId = responsibleManId;
        }
    }
}
